package com.example.filetest;

import javax.sound.midi.Soundbank;
import java.io.File;


public class MyTest {
    public static void main(String[] args) {
        File file = new File("D:\\27162\\Desktop\\系统安全");
        File[] files = file.listFiles();
        for (int i = 0; i < files.length; i++) {
            String replaced = files[i].getName().replace("0127", "0401")
                    .replace("王海燕", "陈任江");
            File newname = new File(file.getAbsoluteFile(), replaced);
            System.out.println(newname);
            files[i].renameTo(newname);
        }
    }
}
